/*
 * @Author: wuyuxin
 * @Date: 2022-01-11 17:00:06
 * @LastEditors: wuyuxin
 * @LastEditTime: 2022-01-12 11:23:50
 * @Description: 
 */
import { UNMOUNTING, NOT_MOUNTED ,MOUNTED} from "../applications/app.helpers";
export async function toUnmountPromise(app){
  // console.log('toUnmountPromise', app)
  if(app.status != MOUNTED){
    return app;
  }
  app.status = UNMOUNTING;
  await app.unmount(app);
  app.status = NOT_MOUNTED;
  return app;
}